<template>
	<view class="content">
		<view class="c2c">
			<view class="chat">
				<view class="time">2020-03-13 15:38:42</view>
				<view class="c">
					<view class="user">
						<view class="avatar">
							<view class="tx left"><image src="../../../static/c2c/chat.png" mode=""></image></view>
							<text>张三</text>
						</view>
					</view>
					<view class="mees"><view class="msg">234234234234</view></view>
				</view>
				<view class="b">
					<view class="user">
						<view class="avatar">
							<text>张三</text>
							<view class="tx right"><image src="../../../static/c2c/chat.png" mode=""></image></view>
						</view>
					</view>
					<view class="mees"><view class="msg">234234234234</view></view>
				</view>
			</view>
			<view class="tip">您有一笔待付订单，请及时处理</view>
			<view class="n_list">
				<view class="n_block" @click="$goPage('detail/detail')">
					<view class="top">
						<view class="left">
							<view class="buy">买</view>
							<text class="wz">
								<text class="big">BTC/</text>
								<text class="small">USDT</text>
							</text>
							<text class="time">02.25 14:00:00</text>
						</view>
						<view class="right">交易完成</view>
					</view>
					<view class="btm">
						<view class="left">
							<view class="one">
								价格 7.5
							</view>
							<text>
								数量 2.66
							</text>
						</view>
						<view class="right">
							<view class="one">
								总金额<text style="margin-left: 8rpx;">￥20.00</text>
							</view>
							<view class="copy">
								<text>订单号<text class="order">20031353840942</text></text>
								<image src="../../../static/copy.png" mode=""></image>
							</view>
						</view>
					</view>
				</view>
				</view>
			<view class="bottom">
				<image class="img" src="../../../static/c2c/img.png" mode=""></image>
				<input type="text" value="" placeholder-class="pla" placeholder="在此输入你的对话..." />
			</view>
		</view>
	</view>
</template>

<script>
import HMmessages from '@/components/HM-messages/HM-messages.vue';
import uniIcons from '@/components/uni-icon/uni-icon.vue';
export default {
	components: { uniIcons },
	data() {
		return {
			name: ''
		};
	},
	computed: {},
	onLoad(option) {
		if (option && option.name) {
			this.name = option.name;
			uni.setNavigationBarTitle({
				title: option.name
			});
		}
	},
	onShow() {},
	onNavigationBarButtonTap(e) {
		this.showExplain = true;
	},
	methods: {
		//打开下载
		showDown(pic) {
			this.saveImg = true;
			this.pic = pic;
		},
		//已付款
		pay() {
			this.status = 2;
		},
		//下载图片
		downImg(pic) {
			if (pic != '') {
				uni.saveImageToPhotosAlbum({
					filePath: pic,
					success: function() {
						uni.showToast({
							title: '图片保存成功',
							icon: 'success',
							duration: 2000
						});
					}
				});
			}
		},
		//隐藏弹窗
		closeModal(name) {
			this[name] = '';
		},
		showMsg(type) {
			if (type == 'bank') {
				this.showBank = true;
			}
			if (type == 'zfb') {
				this.showZfb = true;
			}
			if (type == 'wx') {
				this.showWx = true;
			}
			if (type == 'evaluate') {
				this.showEvaluate = true;
			}
			if (type == 'showExplain') {
				this.showExplain = true;
			}
			if (type == 'showOut') {
				this.showOut = true;
			}
		},
		//错误提示
		errors(text) {
			this.HMmessages.show(text, {
				textAlign: 'center',
				background: '#74272d',
				fontColor: '#fff'
			});
		},
		//复制
		copy(text) {
			let that = this;
			uni.setClipboardData({
				data: text,
				success: () => {
					that.HMmessages.show('复制成功', {
						textAlign: 'center',
						background: '#356e36',
						fontColor: '#fff'
					});
				}
			});
		}
	}
};
</script>

<style lang="scss">
@import './style.scss';
</style>
